#ifndef __CAN_H
#define __CAN_H	 
#include "sys.h"	    
#define Ext_ID  0x14     //本机ID地址为0x14
//CAN接收RX0中断使能
#define CAN_RX0_INT_ENABLE	1		//0,不使能;1,使能.								    								 							 				    
u8 CAN_Mode_Init(u8 tsjw,u8 tbs2,u8 tbs1,u16 brp,u8 mode);//CAN初始化
u8 Can_Send_Msg(u32 ExtId,u8* msg,u8 len);
u8 Can_Receive_Msg(u8 *buf);							  //接收数据

//CAN接收数据消息
typedef struct _CAN_RECV_BOX_
{
	u8 start;
	u8 end;
	u16	cmd;			//命令编码	
	u8	src;			//源节点ID
	u8	dst;			//目的节点ID
	u16	len;			//数据长度
	u8	data[1024];		//载荷数据
}CAN_RECV_BOX;

void CAN_send_to_PC(CAN_RECV_BOX CAN_send_buff);



extern u16 Vol_value[24];
extern u16 I_value;
extern u16 Obj_value;

extern u16 I_value_set;
extern u16 Obj_value_set;
extern u32 SW_value_set;
extern u8  JH_value_set;
extern u8  Cell_type_set;




#endif

















